package com.earl.jdBook;

import com.earl.handler.TestCode;
import com.geccocrawler.gecco.annotation.PipelineName;
import com.geccocrawler.gecco.pipeline.Pipeline;
import org.apache.http.HttpException;

import java.io.IOException;

/**
 * Created by 知鹏 on 2018/6/26.
 */
@PipelineName("productPipeline")
public class ProductPipeline implements Pipeline<ProductDetail> {
    @Override
    public void process(ProductDetail productDetail) {
        TestCode testCode=new TestCode();
        System.out.println(productDetail.getPrice().getPrice()+"pricepricepricepriceprice");
//        try {
//            TestCode.downloadPage("http://sclub.jd.com/comment/productPageComments.action?callback=fetchJSON_comment98vv1302&productId=17494317099&score=0&sortType=5&page=10&pageSize=10&isShadowSku=0&fold=1","fetchJSON_comment98vv1302");
//        } catch (HttpException e) {
//            e.printStackTrace();
//        } catch (IOException e) {
//            e.printStackTrace();
//        }
    }
}
